package hr.web.jsf.converters;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;

import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.intercept.BypassInterceptors;

@Name("stringConverter")
@BypassInterceptors
@org.jboss.seam.annotations.faces.Converter
public class StringConverter implements Converter {

	@Override
	public Object getAsObject(final FacesContext context,
			final UIComponent component, final String string) {
		return string;
	}

	@Override
	public String getAsString(final FacesContext context,
			final UIComponent component, final Object object) {
		return object.toString();
	}
}
